package com.aaa.web.controller.secondcar;

import com.aaa.web.commons.SecondCarTransferRecordQuery;
import com.aaa.web.service.secondcarservice.SecondCarTransferRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
* @program: ${PROJECT_NAME}
* @description: 二手车交易记录界面
* @author: 许一鑫
* @create: 9:26 2019/1/3
**/
@Controller
@RequestMapping("/SecondCarTransferRecordController")
public class SecondCarTransferRecordController {
    /**service层注入*/
    @Autowired
    private SecondCarTransferRecordService service;

    /**跳转二手车交易记录界面*/
    @RequestMapping("/GetSecondCarTransferRecordPage")
    public String getSecondCarTransferRecordPage(Model model){

        return "views/webhtml/secondcar/secondcartransferrecord";
    }
    /**查询所有二手车交易记录,搜索，分页*/
    @RequestMapping("/GetcartransferRecordMessage")
    @ResponseBody
    public Map getCarTransferRecordMessage(SecondCarTransferRecordQuery query){
        Map map=service.getCarTransferRecordMessage(query);
        return map;
    }
}
